<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport"
	      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>定位</title>
	<style>
		.one{
			height: 1000px;
			width: 200px;
			border: 1px solid salmon;
		}
		.two{
			height: 1000px;
			width: 200px;
			border: 1px solid magenta;
			position: sticky;
			top: 100px;
		}
		.three{
			height: 1000px;
			width: 200px;
			border: 1px solid darkblue;
		}
	</style>
</head>
<body>
<div class="container">
	<div class="one">1</div>
	<div class="two">2</div>
	<div class="three">3</div>
</div>
</body>
</html>
